/**
 *  @file SDLColor.h
 *
 *  @date 26-nov-2009
 *  @author Ives van der Flaas
 */

#ifndef COLOR_H_
#define COLOR_H_

#include <SDL.h>
namespace si_sdl
{
/**
 * A color in the SDL way. Sorry about the missing SDL in the name.
 */
class Color
{
public:
	/**
	 * Colors are in range from 0 to 255
	 * @param r
	 * @param g
	 * @param b
	 * @return
	 */
	Color(int r, int g, int b);
	virtual ~Color();

	int toInt() const { return SDL_MapRGB(SDL_GetVideoSurface()->format, fR, fG, fB);  }
	SDL_Color toSDLColor() const;

	bool isTransparant() const { return fIsTransparant; }

	int getR() const { return fR; }
	int getG() const { return fG; }
	int getB() const { return fB; }
private:
	int fR;
	int fG;
	int fB;

	bool fIsTransparant;

};

extern Color transparant;
}

#endif /* COLOR_H_ */
